home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / T2WIN-32.ZIP / _DMLANG.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-01  |  12.0 KB  |  378 lines

  1. VERSION 4.00
  2. Begin VB.Form frmDayMonth 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Days and months in different language"
  5.    ClientHeight    =   4065
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3255
  8.    ClientWidth     =   8130
  9.    Height          =   4470
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4065
  14.    ScaleWidth      =   8130
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2910
  17.    Width           =   8250
  18.    Begin Threed.SSPanel SSPanel1 
  19.       Align           =   1  'Align Top
  20.       Height          =   480
  21.       Left            =   0
  22.       TabIndex        =   1
  23.       Top             =   0
  24.       Width           =   8130
  25.       _Version        =   65536
  26.       _ExtentX        =   14340
  27.       _ExtentY        =   847
  28.       _StockProps     =   15
  29.       ForeColor       =   -2147483640
  30.       BackColor       =   12632256
  31.       Begin VB.ComboBox cmb_Function 
  32.          Height          =   315
  33.          Left            =   1365
  34.          TabIndex        =   2
  35.          Top             =   90
  36.          Width           =   5415
  37.       End
  38.       Begin Threed.SSCommand cmdNP 
  39.          Height          =   300
  40.          Index           =   1
  41.          Left            =   7770
  42.          TabIndex        =   6
  43.          Top             =   90
  44.          Width           =   255
  45.          _Version        =   65536
  46.          _ExtentX        =   450
  47.          _ExtentY        =   529
  48.          _StockProps     =   78
  49.          Caption         =   ">"
  50.          BevelWidth      =   1
  51.          Font3D          =   3
  52.          RoundedCorners  =   0   'False
  53.          Outline         =   0   'False
  54.       End
  55.       Begin Threed.SSCommand cmdNP 
  56.          Height          =   300
  57.          Index           =   0
  58.          Left            =   6930
  59.          TabIndex        =   5
  60.          Top             =   90
  61.          Width           =   255
  62.          _Version        =   65536
  63.          _ExtentX        =   450
  64.          _ExtentY        =   529
  65.          _StockProps     =   78
  66.          Caption         =   "<"
  67.          BevelWidth      =   1
  68.          Font3D          =   3
  69.          RoundedCorners  =   0   'False
  70.          Outline         =   0   'False
  71.       End
  72.       Begin VB.Label Label2 
  73.          Caption         =   "&Select a function"
  74.          Height          =   255
  75.          Left            =   90
  76.          TabIndex        =   4
  77.          Top             =   120
  78.          Width           =   1275
  79.       End
  80.       Begin Threed.SSCommand SSCommand1 
  81.          Default         =   -1  'True
  82.          Height          =   300
  83.          Left            =   7245
  84.          TabIndex        =   3
  85.          Top             =   90
  86.          Width           =   465
  87.          _Version        =   65536
  88.          _ExtentX        =   820
  89.          _ExtentY        =   529
  90.          _StockProps     =   78
  91.          Caption         =   "&Go"
  92.          BevelWidth      =   1
  93.          RoundedCorners  =   0   'False
  94.          Outline         =   0   'False
  95.       End
  96.    End
  97.    Begin VB.Label lbl_Result 
  98.       Appearance      =   0  'Flat
  99.       BackColor       =   &H80000005&
  100.       BackStyle       =   0  'Transparent
  101.       ForeColor       =   &H80000008&
  102.       Height          =   3345
  103.       Left            =   90
  104.       TabIndex        =   0
  105.       Top             =   630
  106.       Width           =   7935
  107.    End
  108. Attribute VB_Name = "frmDayMonth"
  109. Attribute VB_Creatable = False
  110. Attribute VB_Exposed = False
  111. Option Explicit
  112. Option Base 1
  113. Private Const Iteration = 250
  114. Dim IsLoaded         As Integer
  115. Dim TimerStartOk     As Integer
  116. Dim TimerCloseOk     As Integer
  117. Dim TimerHandle      As Integer
  118. Dim TimerValue       As Long
  119. Dim Language(LNG_FRENCH To LNG_NORWAY) As String
  120.       
  121. Private Sub cmdNP_Click(Index As Integer)
  122.    Call sub_NextPrev(cmb_Function, Index)
  123. End Sub
  124. Private Sub cmb_Function_Click()
  125.    If (IsLoaded = False) Then Exit Sub
  126.    Call cDisableFI(mdiT2W.Picture1)
  127.    lbl_Result = ""
  128.    DoEvents
  129.    Select Case cmb_Function.ListIndex
  130.       Case 0
  131.          Call TestAscTime
  132.       Case 1
  133.          Call TestTinyDay
  134.       Case 2
  135.          Call TestSmallDay
  136.       Case 3
  137.          Call TestShortDay
  138.       Case 4
  139.          Call TestLongDay
  140.       Case 5
  141.          Call TestTinyMonth
  142.       Case 6
  143.          Call TestShortMonth
  144.       Case 7
  145.          Call TestLongMonth
  146.    End Select
  147.    DoEvents
  148.    Call cEnableFI(mdiT2W.Picture1)
  149. End Sub
  150. Private Sub Form_Activate()
  151.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  152. End Sub
  153. Private Sub Form_Load()
  154.    IsLoaded = False
  155.    Show
  156.    Call FillLanguage(Language())
  157.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_dmlang.t2w")
  158.    IsLoaded = True
  159. End Sub
  160. Private Sub SSCommand1_Click()
  161.    Call cmb_Function_Click
  162. End Sub
  163. Private Sub TestAscTime()
  164.    Dim intResult        As Integer
  165.    Dim strResult        As String
  166.    Dim strDisplay       As String
  167.    Dim i                As Integer
  168.    intResult = 0
  169.    strResult = ""
  170.    strDisplay = ""
  171.       
  172.    For i = LNG_FRENCH To LNG_NORWAY
  173.       strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
  174.    Next i
  175.    lbl_Result = strDisplay
  176.    'time the function
  177.    TimerHandle = cTimerOpen()
  178.    TimerStartOk = cTimerStart(TimerHandle)
  179.    For i = 1 To Iteration
  180.       strResult = cGetAscTime(LNG_FRENCH)
  181.    Next i
  182.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  183.    TimerCloseOk = cTimerClose(TimerHandle)
  184. End Sub
  185. Private Sub TestTinyDay()
  186.    Dim intResult        As Integer
  187.    Dim strResult        As String
  188.    Dim strDisplay       As String
  189.    Dim i                As Integer
  190.    Dim j                As Integer
  191.    intResult = 0
  192.    strResult = ""
  193.    strDisplay = ""
  194.    For i = LNG_FRENCH To LNG_NORWAY
  195.       strDisplay = strDisplay + Language(i)
  196.       For j = 1 To 7
  197.          strDisplay = strDisplay + cGetTinyDay(i, j) + " "
  198.       Next j
  199.       strDisplay = strDisplay + vbCrLf + vbCrLf
  200.    Next i
  201.    lbl_Result = strDisplay
  202.    'time the function
  203.    TimerHandle = cTimerOpen()
  204.    TimerStartOk = cTimerStart(TimerHandle)
  205.    For i = 1 To Iteration
  206.       strResult = cGetTinyDay(LNG_FRENCH, 1)
  207.    Next i
  208.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  209.    TimerCloseOk = cTimerClose(TimerHandle)
  210. End Sub
  211. Private Sub FillLanguage(arrLanguage() As String)
  212.    arrLanguage(LNG_FRENCH) = "French : "
  213.    arrLanguage(LNG_DUTCH) = "Dutch : "
  214.    arrLanguage(LNG_GERMAN) = "German : "
  215.    arrLanguage(LNG_ENGLISH) = "English : "
  216.    arrLanguage(LNG_ITALIAN) = "Italian : "
  217.    arrLanguage(LNG_SPANISH) = "Spanish : "
  218.    arrLanguage(LNG_CATALAN) = "Catalan : "
  219.    arrLanguage(LNG_POLISH) = "Polish : "
  220.    arrLanguage(LNG_NORWAY) = "Norway : "
  221. End Sub
  222. Private Sub TestSmallDay()
  223.    Dim intResult        As Integer
  224.    Dim strResult        As String
  225.    Dim strDisplay       As String
  226.    Dim i                As Integer
  227.    Dim j                As Integer
  228.    intResult = 0
  229.    strResult = ""
  230.    strDisplay = ""
  231.    For i = LNG_FRENCH To LNG_NORWAY
  232.       strDisplay = strDisplay + Language(i)
  233.       For j = 1 To 7
  234.          strDisplay = strDisplay + cGetSmallDay(i, j) + " "
  235.       Next j
  236.       strDisplay = strDisplay + vbCrLf + vbCrLf
  237.    Next i
  238.    lbl_Result = strDisplay
  239.    'time the function
  240.    TimerHandle = cTimerOpen()
  241.    TimerStartOk = cTimerStart(TimerHandle)
  242.    For i = 1 To Iteration
  243.       strResult = cGetSmallDay(LNG_FRENCH, 1)
  244.    Next i
  245.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  246.    TimerCloseOk = cTimerClose(TimerHandle)
  247. End Sub
  248. Private Sub TestLongDay()
  249.    Dim intResult        As Integer
  250.    Dim strResult        As String
  251.    Dim strDisplay       As String
  252.    Dim i                As Integer
  253.    Dim j                As Integer
  254.    intResult = 0
  255.    strResult = ""
  256.    strDisplay = ""
  257.    For i = LNG_FRENCH To LNG_NORWAY
  258.       strDisplay = strDisplay + Language(i)
  259.       For j = 1 To 7
  260.          strDisplay = strDisplay + cGetLongDay(i, j) + " "
  261.       Next j
  262.       strDisplay = strDisplay + vbCrLf + vbCrLf
  263.    Next i
  264.    lbl_Result = strDisplay
  265.    'time the function
  266.    TimerHandle = cTimerOpen()
  267.    TimerStartOk = cTimerStart(TimerHandle)
  268.    For i = 1 To Iteration
  269.       strResult = cGetLongDay(LNG_FRENCH, 1)
  270.    Next i
  271.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  272.    TimerCloseOk = cTimerClose(TimerHandle)
  273. End Sub
  274. Private Sub TestShortDay()
  275.    Dim intResult        As Integer
  276.    Dim strResult        As String
  277.    Dim strDisplay       As String
  278.    Dim i                As Integer
  279.    Dim j                As Integer
  280.    intResult = 0
  281.    strResult = ""
  282.    strDisplay = ""
  283.    For i = LNG_FRENCH To LNG_NORWAY
  284.       strDisplay = strDisplay + Language(i)
  285.       For j = 1 To 7
  286.          strDisplay = strDisplay + cGetShortDay(i, j) + " "
  287.       Next j
  288.       strDisplay = strDisplay + vbCrLf + vbCrLf
  289.    Next i
  290.    lbl_Result = strDisplay
  291.    'time the function
  292.    TimerHandle = cTimerOpen()
  293.    TimerStartOk = cTimerStart(TimerHandle)
  294.    For i = 1 To Iteration
  295.       strResult = cGetShortDay(LNG_FRENCH, 1)
  296.    Next i
  297.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  298.    TimerCloseOk = cTimerClose(TimerHandle)
  299. End Sub
  300. Private Sub TestTinyMonth()
  301.    Dim intResult        As Integer
  302.    Dim strResult        As String
  303.    Dim strDisplay       As String
  304.    Dim i                As Integer
  305.    Dim j                As Integer
  306.    intResult = 0
  307.    strResult = ""
  308.    strDisplay = ""
  309.    For i = LNG_FRENCH To LNG_NORWAY
  310.       strDisplay = strDisplay + Language(i)
  311.       For j = 1 To 12
  312.          strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
  313.       Next j
  314.       strDisplay = strDisplay + vbCrLf + vbCrLf
  315.    Next i
  316.    lbl_Result = strDisplay
  317.    'time the function
  318.    TimerHandle = cTimerOpen()
  319.    TimerStartOk = cTimerStart(TimerHandle)
  320.    For i = 1 To Iteration
  321.       strResult = cGetTinyMonth(LNG_FRENCH, 1)
  322.    Next i
  323.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  324.    TimerCloseOk = cTimerClose(TimerHandle)
  325. End Sub
  326. Public Sub TestLongMonth()
  327.    Dim intResult        As Integer
  328.    Dim strResult        As String
  329.    Dim strDisplay       As String
  330.    Dim i                As Integer
  331.    Dim j                As Integer
  332.    intResult = 0
  333.    strResult = ""
  334.    strDisplay = ""
  335.    For i = LNG_FRENCH To LNG_NORWAY
  336.       strDisplay = strDisplay + Language(i)
  337.       For j = 1 To 12
  338.          strDisplay = strDisplay + cGetLongMonth(i, j) + " "
  339.       Next j
  340.       strDisplay = strDisplay + vbCrLf + vbCrLf
  341.    Next i
  342.    lbl_Result = strDisplay
  343.    'time the function
  344.    TimerHandle = cTimerOpen()
  345.    TimerStartOk = cTimerStart(TimerHandle)
  346.    For i = 1 To Iteration
  347.       strResult = cGetLongMonth(LNG_FRENCH, 1)
  348.    Next i
  349.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  350.    TimerCloseOk = cTimerClose(TimerHandle)
  351. End Sub
  352. Private Sub TestShortMonth()
  353.    Dim intResult        As Integer
  354.    Dim strResult        As String
  355.    Dim strDisplay       As String
  356.    Dim i                As Integer
  357.    Dim j                As Integer
  358.    intResult = 0
  359.    strResult = ""
  360.    strDisplay = ""
  361.    For i = LNG_FRENCH To LNG_NORWAY
  362.       strDisplay = strDisplay + Language(i)
  363.       For j = 1 To 12
  364.          strDisplay = strDisplay + cGetShortMonth(i, j) + " "
  365.       Next j
  366.       strDisplay = strDisplay + vbCrLf + vbCrLf
  367.    Next i
  368.    lbl_Result = strDisplay
  369.    'time the function
  370.    TimerHandle = cTimerOpen()
  371.    TimerStartOk = cTimerStart(TimerHandle)
  372.    For i = 1 To Iteration
  373.       strResult = cGetShortMonth(LNG_FRENCH, 1)
  374.    Next i
  375.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  376.    TimerCloseOk = cTimerClose(TimerHandle)
  377. End Sub
  378.